/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-04-28
 * Time:8:37
 */
public class Cpu {
    private String model;
    private String frequency;
    private int price;
    private int register;

    public Cpu() {
    }

    public Cpu(String model, String frequency, int price) {
        this.model = model;
        this.frequency = frequency;
        this.price = price;
    }

    public void setRam(){
        this.register=1011;//向寄存器中放入最初数据
        Ram ram=new Ram();
        ram.setData(this.register);
    }
    public void setCpu(){
        Ram ram=new Ram();
        ram.setData(101);//像内存中放入最初数据
        this.register= ram.getData();
    }
}
